import {WeaLocaleProvider} from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;

export function changeQuickSearchValue(value) {
    if (this.conditionForm.isFormInit) {
        this.conditionForm.updateFields({
            taskName: { value }
        });
    }
}
export function quickSearch() {
    this.initTable();
}

export function setConditionVisible(visible) {
    this.conditionVisible = visible;
}

export function search() {
    this.initTable();
    this.setConditionVisible(false);
}

export function clearCondition(){
    this.conditionForm.resetForm()
}

export function getConditions() {
    return [{
        title: getLabel('505990','常用条件'),
        defaultshow: true,
        items: [{
            colSpan: 2,
            conditionType: "INPUT",
            domkey: [
                "taskName"
            ],
            fieldcol: 12,
            label:getLabel('505991','标题'),
            labelcol: 6,
            value: "",
            viewAttr: 2
        }, {
            colSpan: 2,
            conditionType: "BROWSER",
            domkey: [
                "creator"
            ],
            fieldcol: 12,
            label:getLabel('505993','发起人'),
            labelcol: 6,
            value: "",
            viewAttr: 2,
            browserConditionParam: {
                completeParams: {},
                conditionDataParams: {},
                dataParams: {},
                destDataParams: {},
                hasAddBtn: false,
                hasAdvanceSerach: true,
                idSeparator: ",",
                isAutoComplete: 1,
                isDetail: 0,
                isMultCheckbox: false,
                isSingle: false,
                pageSize: 10,
                quickSearchName: "",
                replaceDatas: [],
                title: getLabel('505994','人力资源'),
                type: "17",
                viewAttr: 2
            },
        }]
    }]
}